package com.tt.utils.wordUtils.entity;

import com.tt.utils.wordUtils.renderplicy.PoiPictureUtils;
import lombok.Data;

import java.util.List;

/**
 * @Title: ImageContent
 * @Author zl
 * @Package com.oberyun.goHAZOP.utils.wordUtils.entity
 * @Date 2025/9/8 11:27
 * @description: 图片内容
 */
@Data
public class ImageContent {
    /**
     * 对应key
     */
    private String key;

    private List<ImageBody> imageBody;

    public ImageContent(String key, List<ImageBody> imageBody) {
        this.key = key;
        this.imageBody = imageBody;
    }

    /**
     * 图片基础信息
     */
    @Data
    public static class ImageBody {
        /**
         * 图片地址
         */
        private Object imageUrl;
        /**
         * 类型
         */
        private PoiPictureUtils.PictureSourceType sourceType;
        /**
         * 图片宽度
         */
        private Integer width = 15;


        public ImageBody(Object imageUrl, PoiPictureUtils.PictureSourceType sourceType) {
            this.imageUrl = imageUrl;
            this.sourceType = sourceType;
        }

        public ImageBody(Object imageUrl, PoiPictureUtils.PictureSourceType sourceType, Integer width) {
            this.imageUrl = imageUrl;
            this.sourceType = sourceType;
            this.width = width;
        }
    }

}
